<template>
	<view class="card">
		<view class="top">
			<view class="qrcode">
				<uqrcode ref="qrcode" canvas-id="qrcode" :value="code" />
			</view>
			<view class="sep" />
			买单时扫描付款码或出示二维码,即可享受优惠哟~
		</view>
		<view class="bottom">
			<view class="title">我的卡包</view>
			<view class="template">
				<view class="content">
					<view class="left">
						<image src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" class="icon" mode="aspectFill" />
						<view class="shop">
							<view class="name">北京烤鸭店</view>
							<view class="money">余额: ￥0</view>
						</view>
					</view>
				</view>
				<view class="card-sep" />
			</view>
			<view class="template">
				<view class="content">
					<view class="left">
						<image src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" class="icon" mode="aspectFill" />
						<view class="shop">
							<view class="name">北京烤鸭店</view>
							<view class="money">余额: ￥0</view>
						</view>
					</view>
				</view>
			</view>
			<view class="space" />
		</view>
		<view class="pay">
			<view class="money">
				待扣款:￥
				<view class="amount">12.98</view>
			</view>
			<view class="submit">确定扣款</view>
		</view>
	</view>
</template>

<script setup lang="ts">
import { ref } from 'vue';
const code = ref('aaaa');

// 扣款成功  跳转成功页
</script>

<style lang="scss" scoped>
.card {
	height: 100vh;
	background: #f8f8f8;
	padding: 15px;
	position: relative;
}
.top {
	text-align: center;
	border-radius: $uni-border-radius-lg;
	background: white;
	color: $uni-text-color-grey;
	padding: 30px 15px;
	font-size: $uni-font-size-base;
	.qrcode {
		display: flex;
		justify-content: center;
	}
}
.sep {
	height: 1px;
	background: #eceaeb;
	margin: 20px auto;
}

.card-sep {
	height: 1px;
	background: #eceaeb;
	margin: 20px 0;
}
.bottom {
	margin-top: $uni-spacing-row-lg;
	padding: 30px 15px;
	background: white;
	.title {
		font-size: $uni-img-size-sm;
		font-weight: 600;
		margin-bottom: $uni-spacing-row-lg;
	}
	.icon {
		width: 40px;
		height: 40px;
		border-radius: $uni-border-radius-base;
	}
	.content {
		display: flex;
		justify-content: space-between;
	}
	.left {
		display: flex;
	}
	.shop {
		margin-left: 9px;
		.name {
			font-weight: 600;
		}
		.money {
			color: #969696;
		}
	}
	.right {
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
}
.pay {
	position: fixed;
	width: calc(100% - 80px);
	left: 0;
	bottom: 0;
	background: white;
	height: 30px;
	padding: 40px;
	display: flex;
	justify-content: space-between;
	.money {
		line-height: 40px;
		display: flex;
		.amount {
			font-size: 23px;
		}
	}
	.submit {
		line-height: 30px;
		padding: 0 10px;
		border-radius: 15px;
		background: #f11835;
		color: white;
	}
}
.space {
	height: 80px;
}
</style>
